package Day_06.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

@Component
@Aspect
public class AOP {


    @Before("execution(public * *(..))")
    public void testaop(){
//        MethodSignature signature=(MethodSignature) joinPoint.getSignature();
//        Method method=signature.getMethod();
        //此处可以根据一些特殊的方法进行处理逻辑
       // if(method.getName().equals("UpdateEventListener"))
        System.out.println("==========拦截窃听器成功：");
    }


}
